//
//  ZPBSecondGetModel.m
//  WZLProduct
//
//  Created by boys on 16/3/22.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "ZPBSecondGetModel.h"
#import "ZPBThirdGetModel.h"

@implementation ZPBSecondGetModel

+ (ZPBSecondGetModel *)zpbSecondModel {
    return [[ZPBSecondGetModel alloc] init];
}

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"songs"]) {
        NSMutableArray *tempArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ZPBThirdGetModel *model = [[ZPBThirdGetModel alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            [tempArr addObject:model];
        }
        self.songs = [NSArray arrayWithArray:tempArr];

    }
}

//容错方法
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

@end
